package com.example.springboothutoolTask.config;

import cn.hutool.cron.CronUtil;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class CronTaskInitializer implements CommandLineRunner {

    @Override
    public void run(String... args) throws Exception {
        // 启动定时任务
        CronUtil.start();
    }
}

